package prh25.biblioteca.entity.dao.hibernate;

import java.util.List;

import org.hibernate.criterion.Restrictions;

import prh25.biblioteca.entity.Arquivo;
import prh25.biblioteca.entity.dao.ArquivoDAO;

/**
 * <p>Hibernate DAO layer for Arquivos</p>
 * <p></p>
 *
 * @author Wilson
 * @see http://code.google.com/p/prh-doc/
 */
public class ArquivoHibernateDAO extends
		AbstractHibernateDAO<Arquivo, Integer> implements
		ArquivoDAO {

	/**
	 * Find Arquivo by version
	 */
	public List<Arquivo> findByVersion(Integer version) {
		return findByCriteria(Restrictions.eq("version", version));
	}
	
	/**
	 * Find Arquivo by entityUid
	 */
	public List<Arquivo> findByEntityUid(String entityUid) {
		return findByCriteria(Restrictions.eq("uid", entityUid));
	}
	
	
	

}
